/*
 * user_433_pari_gpio_manager.c
 *
 *  Created on: Jan 12, 2025
 *      Author: Lenovo
 */


#include "debug.h"
#include "user_OC_driver.h"

//void EXTI9_5_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
//
///*********************************************************************
// * @fn      EXTI0_IRQHandler
// *
// * @brief   This function handles EXTI0 Handler.
// *
// * @return  none
// */
//void EXTI9_5_IRQHandler(void)
//{
//  if(EXTI_GetITStatus(EXTI_Line7)!=RESET)
//  {
//    printf("req open door\r\n");
//    lock_ctrl_open();
//    lock_ctrl_idle();
//    EXTI_ClearITPendingBit(EXTI_Line7);     /* Clear Flag */
//  }
//}
//
///*********************************************************************
// * @fn      EXTI0_INT_INIT
// *
// * @brief   Initializes EXTI0 collection.
// *
// * @return  none
// */
//void EXTI9_5_INT_INIT(void)
//{
//    GPIO_InitTypeDef GPIO_InitStructure = {0};
//    EXTI_InitTypeDef EXTI_InitStructure = {0};
//    NVIC_InitTypeDef NVIC_InitStructure = {0};
//
//    RCC_PB2PeriphClockCmd(RCC_PB2Periph_AFIO | RCC_PB2Periph_GPIOA, ENABLE);
//
//    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7;
//    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
//    GPIO_Init(GPIOA, &GPIO_InitStructure);
//
//    /* GPIOA ----> EXTI_Line7 */
//    GPIO_EXTILineConfig(GPIO_PortSourceGPIOA, GPIO_PinSource7);
//    EXTI_InitStructure.EXTI_Line = EXTI_Line7;
//    EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;
//    EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Falling;
//    EXTI_InitStructure.EXTI_LineCmd = ENABLE;
//    EXTI_Init(&EXTI_InitStructure);
//
//    NVIC_InitStructure.NVIC_IRQChannel = EXTI9_5_IRQn;
//    NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
//    NVIC_InitStructure.NVIC_IRQChannelSubPriority = 2;
//    NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
//    NVIC_Init(&NVIC_InitStructure);
//}
//
//void user_OC_gpio_init(void){
//    EXTI9_5_INT_INIT();
//}

